<?php
	include(ROOTPATH .'include'. DS .'protect.php');
	include(ROOTPATH .'include'. DS .'checkUserLogin.php');
	$powder_min = 5 ;
	include(ROOTPATH .'include'. DS .'checkPowder.php');
	include "header.php"; 
	
?>
<script type="text/javascript" src="<?php echo JSLAB_PATH;?>datePicker/js/jquery-ui-1.7.custom.min.js"></script>
<link rel="stylesheet" href="<?php echo JSLAB_PATH;?>datePicker/themes/base/yellow1.css" type="text/css"> 

<script type="text/javascript">
var isEdit = false;
if( <?php if( $isEdit ) echo 'true'; else echo 'false';?>)
	isEdit = true;
</script>

<script type="text/javascript" src="<?php echo WEB_ROOT_PATH;?>upload/scripts/swfobject.js"></script>
<script type="text/javascript" src="<?php echo WEB_ROOT_PATH;?>upload/scripts/jquery.upload.min.js"></script>
<?php echo loadEdit('#description','task') ;?>
<script type="text/javascript" src="<?php echo JS_PATH;?>taskAdd.js"></script>
</head>
<body>

<?php require('top.php'); ?>
<div class="pos">	
    <div class="contents">
		<?php require('nav.php'); ?>
        <h2 class="title"><?php echo $navigation -> getList();?></h2>
        <div id="upload">        
        <form action="<?php echo WEB_ROOT_PATH;?>?option=taskAddAction&type=action" method="post" enctype="multipart/form-data" name="uploadForm" class="form upload" id="uploadForm">
        <ul class="box">
        <li><label class="highBig">任务标题</label><input id="fileName" class="text shiningTFD" value="<?php echo $show['name']?>" name="fileName" type="text" maxlength="60" /><h4>你还可以输入<span id="fileNameNum" class="titleNum"></span>个字</h4></li>
        <hr />
        <li><label class="highBig">任务描述</label><textarea cols="50" rows="8" id="description" name="description" class="taskDescription shiningTFD"><?php echo htmlShow($show['description'],'<p><br><a><img><b>')?></textarea><h4>你还可以输入<span id="descriptionNum" class="titleNum"></span>个字</h4></li>
        <hr />
        <li><label class="highBig">截止日期</label><input id="timeEnd" class="text" name="timeEnd" type="text" value="<?php
		if( '' == $show['timeEnd'] )
			echo date('Y-m-d',time()+1000000);
		else
			echo date('Y-m-d',strtotime($show['timeEnd']));		
		?>" maxlength="30" /></li>
        </ul>
        <h2 class="title foldedTitle" id="otherOptionKey"><b>+</b> 更多选项（可选）</h2>
        <ul class="box" id="otherOption">
        	<li class="tagMenu"><label ids="3" class="highBig">自定义标签：</label>
                <div id="tagList" class="tagListCustom">
                <?php
                    //1!1,2,3,4,5|3!119,120,121
                    echo $tag -> getCustomMenu($show['tag'],'task');
                ?>
                </div>
                <input id="customizeTag" name="customizeTag" type="text" class="text" maxlength="20" /> <input type="button" class="submit" id="addTag" value="增加" />
            </li>
            <hr />
            <li><label class="highBig">任务图标:</label>
                <div id="thumb"><img src="<?php echo $task -> getTaskThumb($show['thumb']);?>" /></div>
                <input type="file" name="mediaThumb" id="mediaThumb" />
                
                <span class="tips">格式仅限JPG、GIF、PNG，大小不超过8M，建议高宽比为16:9。</span>
                <div id="mediaThumbQueue"></div>
            </li>            
            <hr />
            <li><label class="highBig">任务附件</label><input type="file" name="mediaFileSource" id="mediaFileSource" /><span class="tips">任务附件是完成任务必须的素材文件，格式仅限JPG, PNG, GIF, DOC, PPT, PDF, ZIP, RAR, GZIP，大小不超过100M。</span></li>
            <hr />
            <div id="mediaFileSourceQueue"><?php echo getMediaFiles($show['file'],$show['fileTitle']); ?></div>
        </ul>
        
        <ul class="highOther">
        <li><input name="" type="submit" value="<?php echo lang_submit;?>" class="submit" /><input name="task_id" id="task_id" type="hidden" value="<?php echo $idCode ;?>"/></li>
        </ul>
        </form>
        </div><!--#upload-->
	</div><!-- .contents-->
</div>

<div class="pos posFooter"></div>

</body>
</html>
